package com.shiminghui.test4;

import java.util.Scanner;

public class CarTset {


    public static void main(String[] args) {
        Car[] arr = new Car[3];
        Scanner scanner = new Scanner(System.in);
        for (int i =0;i<arr.length;i++) {
            Car car = new Car();
            car.setBrand(scanner.next());
            car.setPrice(scanner.nextInt());
            car.setColor(scanner.next());
            arr[i]=car;
        }

        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i].getBrand()+" "+arr[i].getPrice()+" "+arr[i].getColor());
        }
        int sum = 0;
        for (int i = 0; i < arr.length; i++) {
            sum+= arr[i].getPrice();
        }
        System.out.println(sum/arr.length);
    }

}
